<%@ page import="java.util.Enumeration"%>
<%
     String r_cookie = request.getHeader("cuki");
     Cookie[] cukiz = request.getCookies();
     response.addCookie(new Cookie("kiki","riki"));
%>
Cukiz:<br>
<%
     for ( int i = 0; i < cukiz.length; i++ ) {
          Cookie cookie = cukiz[ i ];
          %><%=cookie.getName()%>=<%=cookie.getValue()%>(<%=cookie.getMaxAge()%>)<br><%
     }
%>
<br><br>Headers:<br>
<%
     Enumeration headers = request.getHeaderNames();
     while ( headers.hasMoreElements() ) {
          String o = ( String ) headers.nextElement();
          %><%=o%>=<%=request.getHeader(o)%><br><%
     }
%>